// Copyright 2012 Google Inc. All Rights Reserved.

package com.google.developers.tv.gdl;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * @author krispy@google.com (Krispy Uccello)
 *
 */
public class VideoDictionaryOpenHelper extends SQLiteOpenHelper {
  
  public static final String URL_KEY = "url";
  public static final String VIDEO_DESC = "video_desc";
  
  private static final int DATABASE_VERSION = 2;
  private static final String DICTIONARY_TABLE_NAME = "dictionary";
  private static final String DICTIONARY_TABLE_CREATE =
              "CREATE TABLE " + DICTIONARY_TABLE_NAME + " (" +
                  URL_KEY + " TEXT, " +
                  VIDEO_DESC + " TEXT);";

  /**
   * @param context
   * @param name
   * @param factory
   * @param version
   */
  public VideoDictionaryOpenHelper(
      Context context, String name, CursorFactory factory, int version) {
    super(context, name, factory, version);
  }

  @Override
  public void onCreate(SQLiteDatabase db) {
    db.execSQL(DICTIONARY_TABLE_CREATE);
  }

  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    // TODO(krispy): Auto-generated method stub

  }

}
